<template>
    <div>

    </div>
</template>

<script>
import { mapGetters, mapActions } from 'vuex';
export default {
    props: {
        isShow: {
            type: Boolean,
            default: true,
        },
    },
    name: '',
    data() {
        return {};
    },
    computed: {
        ...mapGetters({
            nickname: 'userinfo/getNickname',
        }),
    },

    methods: {
        ...mapActions({
            showLogin: 'global-dialog/showLogin',
        }),
        // 判断是否登录
        checkLoginHandler() {
            
            const SERIAL_CODE = this.$cookies.get('SERIAL_CODE');
            if (SERIAL_CODE) {
                return;
            }
            // if (this.nickname) {
            //     return true;
            // }
            showMsgBox('尚未登录 ,请先登录!', 'error', () => {
                this.showLogin(); //登录弹窗
            });
        },
    },
    mounted() {
        this.checkLoginHandler();
    },
};
</script>

<style scoped>
</style>
